//
// Created by summerday on 2021/6/10.
//

#ifndef C_PROJECT_SSTRING_H
#define C_PROJECT_SSTRING_H
#define TRUE 1
#define FALSE 0
#define ERROR -1
#define OK 1

typedef int Status;
#define MAXSTRLEN 255
typedef unsigned char SString[MAXSTRLEN + 1];

Status StrAssign(SString &T, char *chars);
Status StrCopy(SString &T, SString S);
bool StrEmpty(SString S);
Status StrCompare(SString S, SString T);
int StrLength(SString S);
void ClearString(SString &S);
void Concat(SString &T, SString S1, SString S2);
void displayStr(SString T);
Status SubString(SString &Sub, SString S, int pos, int len);
int Index(SString S, SString T, int pos);
Status Replace(SString &S, SString T, SString V);
Status StrInsert(SString &S, int pos, SString T);
Status StrDelete(SString &S, int pos, int len);

#endif //C_PROJECT_SSTRING_H
